﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace RitS.Physics
{
    /// <summary>
    /// Contains all the fields needed to keep track of physics for an object
    /// </summary>
    public interface IPhysicsBody
    {
        /// <summary>
        /// Gets or sets the position of the object, based on center mass
        /// </summary>
        Point Position { get; set; }

        /// <summary>
        /// Gets or sets the current offset of the center of mass
        /// </summary>
        Point RelativeCenterMass { get; set; }

        /// <summary>
        /// Gets or sets the current velocity
        /// </summary>
        Vector Velocity { get; set; }

        /// <summary>
        /// Gets or sets the current rotation around the center of mass in radians, pointing straight right = 0;
        /// </summary>
        double Rotation { get; set; }

        /// <summary>
        /// Gets or sets the current mass
        /// </summary>
        double Mass { get; set; }

        /// <summary>
        /// Applies a force on the object with the default physics tick
        /// </summary>
        /// <param name="force"></param>
        void ApplyForceTick(Vector force);

        /// <summary>
        /// Applies a force on the object with the given physics tick
        /// </summary>
        /// <param name="force"></param>
        /// <param name="tickTime"></param>
        void ApplyForceTick(Vector force, int tickTime);

        /// <summary>
        /// Applies to object's velocity to its position with the default physics tick
        /// </summary>
        void ApplyVelocityTick(int Ticks);
    }
}
